package com.atxiao;

import java.io.*;

public class Demo {


    public static void main(String[] args) throws IOException {
        File file = new File("E:\\demo\\demo_1.txt");
        FileInputStream fis = new FileInputStream(new File("E:\\demo\\demo_1.txt"));

        FileOutputStream fos = new FileOutputStream("E:\\demo\\demo_2.txt");
        fos.write("对对对".toString().getBytes());
        System.out.println("写完了");

//        if (!file.exists()){
//            file.createNewFile();
//        }
        FileWriter fileWriter = new FileWriter(file, true);
        String data="11111";
        fileWriter.write(data);
        fileWriter.close();
    }


















}
